#ifdef DUMP_MEMORY_LEAK
#include <vld.h>
#endif
#include "package_mgr.h"

void PackageMgr::add(PackageMgr::Register::RegisteePtr registee)
{
	Register::add(registee->messageID(), registee);
}

PackageMgr::Register::RegisteePtr PackageMgr::get(int index)
{
	IPackage::Ptr ret = Register::get(index);
	if(ret.get() == NULL) { return ret; }
	IPackage::Ptr clonedPkt = ret->clone();
	return clonedPkt;
}

SingletonSurpportImp(PackageMgr);